<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //YYYY-MM-DD
        function translateDateToCh(Start,End){
            let StartDateObj = openDate(Start)
            let EndDateObj = openDate(End)
            let translateDateArr = []
            if(StartDateObj.month === EndDateObj.month&&StartDateObj.year === EndDateObj.year){
                let translateDateArrLength = EndDateObj.day - StartDateObj.day+1
                let StartDay = StartDateObj.day
                for(let i = 0;i<translateDateArrLength;i++){
                    translateDateArr.push(StartDateObj.month+'月'+StartDay+'日')
                StartDay++
                }
                
            }
            return translateDateArr
        }
        function openDate(Date){
            let DateArr=Date.split("-")
            if(DateArr.length === 3){
                return {
                    year:DateArr[0]*1,
                    month:DateArr[1]*1,
                    day:DateArr[2]*1
                }
            }else if(DateArr.length === 2){
                return {
                    month:DateArr[0]*1,
                    day:DateArr[1]*1
                }
            }
        }
        console.log(translateDateToCh('4-10','04-25'))
    </script>
</body>
</html>